@import "./variables.styl";
@import "../components/loader.styl";

$sidebarWidth = 180px;
$headerHeight = 50px;
$appcontentPad = 15px;

body{
  background: #fff;
}

b{
  font-weight: 900;
}

.g-table {
  table{
    width: 100%;
    text-align: center;
    border-spacing: 0;
    border-collapse: collapse;
  }
  td,th {
    border: 1px solid #ccc;
    padding: 5px;
    border-spacing: 0;
    border-collapse: collapse;
  }
}

input, textarea, select{
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #aaa;
}

.g-nopadding{
  padding: 0;
}

.m-header{
  background: #333;
  height: $headerHeight;
  line-height: $headerHeight;
  padding-left: $sidebarWidth;
  padding: 0 30px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 2;
  color: #fff;
  a{
    color: #fff;
  }
}

footer{
  text-align: center;
}

.m-sidebar{
  position: fixed;
  width: $sidebarWidth;
  height: 100%;
  left: 0;
  top: 0;
  background: #333744;
  color: #fff;
  z-index: 1;
  padding-top: $headerHeight;
  ul{
    padding: 30px 0;
  }
  a{
    padding: 5px 10px;
    display: block;
    cursor: pointer;
    color: #fff;
    margin-bottom: 5px;
    transition(all $fast);
    text-decoration: none;
    font-size: 12px;
    &.active{
      text-decoration: none;
      background: #fff;
      color: #4c4c4c;
      &:hover{
        background: #fff;
      }
    }
    &:hover{
      text-decoration: none;
      background: #42485b;
    }
  }
}

.m-appcontent{
  position: fixed;
  top: $headerHeight + $appcontentPad;
  right: 0;
  z-index: 0;
  text-align: left;
  width: 100%;
  padding-left: $sidebarWidth + $appcontentPad;
  padding-right: $appcontentPad;
  padding-bottom: $appcontentPad;
  overflow: auto;
  height: 90%;
}

@media (max-width: $xsWidth) {
  .m-sidebar{
    position: relative;
    width: 100%;
  }
  .m-appcontent{
    position: relative;
    padding-left: 15px;
  }
}

.m-login{
  padding-top: 100px;
  .panel{
    width: 70%;
  }
}

.g-tab{
  // padding: 10px;
  display: flex;
  text-align: center;
  li{
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    &:hover, &.active{
      border-bottom: #337ab7 1px solid;
    }
  }
}

.manage-enter {
  opacity: 0.01;
  transition(all 0.5s ease-out);
  transform(translate3d(100px, 0, 0));
  // transition: all .5s ease-in;
  // transform: translate3d(-100px, 0, 0);
}

.manage-enter.manage-enter-active {
  opacity: 1;
  transform(translate3d(0, 0, 0));
  // transform: translate3d(0, 0, 0);
}

.manage-leave {
  opacity: 0;
  // transition: all .5s ease-in;

}

.manage-leave.manage-leave-active {
  opacity: 0;
  // transform: translate3d(100px, 0, 0);
}

// diy
.min-width-label {
  width: 90px;
  display: inline-block;
  text-align: right;
  font-weight: 900;
}